var span=document.querySelector('span')
 var post=document.getElementById("post")
 var biaoti=document.getElementById("title").value;
				//var selects=document.getElementsByTagName("select");

var selec=document.getElementById("sec").value;
var txtara=document.getElementById("content").value;
			
	var  img=['img/tou01.jpg','img/tou02.jpg','img/tou03.jpg','img/tou04.jpg']
	/**
	 * 获取图片
	 * @returns 
	 */
	function getimg(){
		var index=Math.floor(Math.random()*1000)%img.length
		return img[index]
	}		
	/**
	 * 发帖 */	
	span.addEventListener('click',function (){
		var post=document.getElementById("post")
		post.style.display='block'
	})
	
	 function postSuccess(){
		  var  img=getimg()
		  var time=now()
		  var  li=document.createElement('li')
		  var text=`<div><img src=${img}></div>
		  <h1>${biaoti}</h1>
		  <p>
			<span>版块：${selec}</span>
			<span>发表时间：${time}</span>
		  </p>
		  
		  `
		  li.innerHTML=text
		  document.querySelector("#postList")
            .appendChild(li);


		  document.getElementById('post').style.display='none'

	 }